<style lang="scss" scoped>
	.content {
		background-color: #ffffff;
		line-height: 0.7rem;
		padding: 0.2rem;
		word-break: break-all;
	}
</style>

<template>
	<div class="container hasNav">
		<van-nav-bar title="HT系统" left-text="返回" left-arrow @click-left="$router.back()" fixed />
		<div class="content" v-html="content"></div>
	</div>
</template>

<script>
	import {
		mapGetters
	} from 'vuex';

	export default {
		name: 'Article',
		data() {
			const {
				index
			} = this.$route.query;

			return {
				index,
				content: ''
			}
		},
		computed: {
			...mapGetters(['banners'])
		},
		beforeMount() {
			if (this.banners.length === 0) {
				this.$router.back();
			} else {
				this.content = this.banners[this.index].describe;
			}
		}
	};
</script>
